-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HBASE-26245 Store region server list in master local region #4136
Conversation
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
Ping @taklwu |
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, but please see also suggestions for additional refactor possible and naming.
* Mainly be used when restarting master, to load the previous active region server list. | ||
*/ | ||
@InterfaceAudience.Private | ||
public interface RegionServerListStorage { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the 'Storage' part has a redundant meaning, let's just call this RegionServerList
?
* Please see HBASE-26245 for more details. | ||
*/ | ||
@InterfaceAudience.Private | ||
public class MasterRegionRegionServerListStorage implements RegionServerListStorage { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just MasterRegionServerList
? The 'Region' part of MasterRegion can be implied. See elsewhere that the 'Storage' part of RegionServerListStorage can also be implied.
@@ -964,7 +969,8 @@ private void finishActiveMasterInitialization(MonitoredTask status) throws IOExc | |||
this.regionServerTracker.upgrade( | |||
procsByType.getOrDefault(ServerCrashProcedure.class, Collections.emptyList()).stream() | |||
.map(p -> (ServerCrashProcedure) p).map(p -> p.getServerName()).collect(Collectors.toSet()), | |||
walManager.getLiveServersFromWALDir(), walManager.getSplittingServersFromWALDir()); | |||
Sets.union(rsListStorage.getAll(), walManager.getLiveServersFromWALDir()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need to also track, and take a union here of, live servers via WALManager? Is the WALManager based live server stuff redundant now? Can we remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for rolling upgrading, where we have nothing in the master local region yet. I think we could remove the union in 4.0.0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There could be a migration step, and then taking the union is not necessary. The concern here is tracking by two mechanisms can cause issues or complicate troubleshooting if they get out of sync. It can be a follow up change if deemed important at some future time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be a follow up. It is not easy as the WAL directory is not actually a 'storage', so the 'migration' is not an actual migration as the WAL directory is always there even after 'migration'...
import org.junit.experimental.categories.Category; | ||
|
||
/** | ||
* Simulate the scenario described in HBASE-26245, where we clean the WAL directory and try to start |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is excellent! Have been bitten by this scenario in test environments, nice to see a passing test for a solution.
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
Signed-off-by: Andrew Purtell <[email protected]> (cherry picked from commit bb1bbdd) (cherry picked from commit 2711142)
Signed-off-by: Andrew Purtell <[email protected]> (cherry picked from commit bb1bbdd) (cherry picked from commit 2711142)
No description provided.